<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/event.css') ?>
<?php
$routeParam = array('controller' => 'event', 'action' => 'index');
if(isset($this->routeParam)) {
    $routeParam = $this->routeParam;
}
if(isset($this->showAllBtnLabel)) {
    $showAllBtnLabel = $this->showAllBtnLabel;
} else {
    $showAllBtnLabel= $this->translate('XXX_EVENT_INDEX_SHOW_ALL_EVENT_OF_TYPE');
}
?>
<div class="event-list">
    <?php foreach ($this->list as $entry): ?>
    <?php if(!$this->showEmpty && empty($entry['rows'])) continue; ?>
        <div class="entry">
            <?php if ($this->showAllLink): ?>
                <?php
                $routeParam['type'] = $entry['type'];
                $routeParam['start_date'] = $this->startDate;
                $routeParam['end_date'] = $this->endDate;
                ?>
                <a class="show-all" href="<?= $this->url($routeParam, 'default', true) ?>"><?= $showAllBtnLabel ?></a>
            <?php endif ?>
            <h4 class="type <?= $entry['type'] ?>"><?= $entry['display'] ?></h4>
            <?php
            $this->rows = $entry['rows'];
            echo $this->render('event/common/event-table.phtml');
            ?>
        </div>
    <?php endforeach ?>
</div>